package com.itheima.demo02interface;

import java.util.function.Predicate;

public class Demo07Predicate {
    public static void main(String[] args) {
        isLongName((String str) -> {
            return str.length() > 3;
        });
    }

    public static void isLongName(Predicate<String> predicate){
        boolean result = predicate.test("魔力飞仙");
        System.out.println("是否是长名字 ：" + (result ? "是" : "否"));

    }
}
